﻿@model Google.GData.Client.Feed<Google.YouTube.Comment>
@if (Model.TotalResults > 0 && !ViewContext.RouteData.Values["action"].ToString().Contains("pecial"))
{
    int currentPage = Model.StartIndex / Model.PageSize;
    bool generateSeparator = false;
    if (Model.StartIndex > 1)
    {
        //prev Link
        
    @Html.ActionLink("Prev Page", ViewContext.RouteData.Values["action"].ToString(), new { page = currentPage - 1 }, new { @class = "pageLink" })
        
generateSeparator = true;
    }

    if ((Model.StartIndex + Model.PageSize) < Model.TotalResults)
    {
        if (generateSeparator)
        {
    @Html.Raw(" - ")        
        }    
    @Html.ActionLink("Next Page", ViewContext.RouteData.Values["action"].ToString(), new { page = currentPage + 1 }, new { @class = "pageLink" })
    }
    <span class="totalResults">@Model.TotalResults Comments</span>

}
